package it.CookBook;

import java.io.File;

public class NodeBean {

	public NodeBean(File file, String name) {
		this.file = file;
		this.name = name;
	}

	private File file;
	private String name;

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		if (getName().lastIndexOf(".") != -1)
			return getName().toLowerCase().substring(0, getName().lastIndexOf(".")).toUpperCase();
		
		return getName().toLowerCase().replace(".jpg", "").toUpperCase();
	}
}